<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!-- ============== LEFT SIDEBAR ================== -->
<!-- <div id="left-sidebar">
	<div class="widget">
		<div class="show-box">
			<div class="title-box">Wish Lists</div>
			<div class="content-boxx">
				<a href="#">Wish list 1</a> <br />
				<a href="#">Wish list 2</a> <br />
				<a href="#">Wish list 3</a> <br />
				<a href="#">Wish list 4</a> <br />
				<a href="#">Wish list 5</a> <br />
			</div>
		</div>
	</div>
</div> -->
<div id="Page-content">

	<s:if test="%{#request.wishlist.getWishListDetails() == null}">
		<div style="font-size: 20px; font-weight: bold; margin: 20px">
		 	No exist wishlist
		 </div>
	</s:if>
	<s:else>
		<div style="font-size: 20px; font-weight: bold; margin: 20px"> <s:property value="#request.wishlist.getName()" /> </div>
		<table style="text-align: center; margin: 20px">
			<tr>
				<th style="text-align: center; font-size: 20px; font-weight: bold">N.Order</th>
				<th style="text-align: center; font-size: 20px; font-weight: bold">Picture</th>
				<th style="text-align: center; font-size: 20px; font-weight: bold">Product</th>
				<th style="text-align: center; font-size: 20px; font-weight: bold">Price</th>
				<th ></th>
			</tr>
			
			<s:iterator status="wish" value="#request.wishlist.getWishListDetails()">
				<tr>
					<td style="text-align: center; font-size: 12px; font-weight: bold">
						<s:property value="#wish.index+1" />
					</td>
					<td>
						<a href="<s:url action="detailproduct.action" namespace="/"><s:param name="sku" value="getProduct().getSku()" /></s:url>">
							
							<s:url value="%{'/' + getProduct().getProductImages().iterator().next().getImageUrl()}" var="urlTag" namespace="/" />
							
							<img src="<s:property value="#urlTag"/>" width="100" height="100" />
						</a>
					</td>
					<td style="text-align: center; font-size: 12px; font-weight: bold">
						<a href="<s:url action="detailproduct.action" namespace="/"><s:param name="sku" value="getProduct().getSku()" /></s:url>">
							<s:property value="getProduct().getName()" />
						</a>
					</td>
					<td style="text-align: center; font-size: 12px; font-weight: bold">
						<s:property value="getProduct().getPrice()" /> $
					</td>
					<td>
						<div class="button">
							<a href="<s:url action="user/info" namespace="/"><s:param name="action" >RemoveItemWishList</s:param><s:param name="sku" value="getProduct().getSku()" /></s:url>">Remove</a>
						</div>
					</td>
				</tr>
			</s:iterator>
			
		</table>
	</s:else>
</div>
